from django.forms import ModelForm, Form, ModelChoiceField, IntegerField, CharField, Select
from models import *


class PropiedadSearchForm(Form):
	provincia = CharField(max_length=25, widget= Select(choices=PROVINCIAS_CHOICES))
	ciudad = CharField(max_length=25, widget= Select(choices=CIUDADES_CHOICES))
	tipo = CharField(max_length=25, widget = Select(choices=TIPO_PROPIEDAD_CHOICES))
	precio_desde = IntegerField(initial=0, min_value=0, label='desde')
	precio_hasta = IntegerField(label='hasta')


class PropiedadForm(ModelForm):
    class Meta:
        model = Propiedad
        exclude = ('publicante',)

class DepartamentoForm(ModelForm):
    class Meta:
        model = Departamento
        exclude = ('publicante',)

class CasaForm(ModelForm):
    class Meta:
        model = Casa
        exclude = ('publicante',)

class CampoForm(ModelForm):
    class Meta:
        model = Campo
        exclude = ('publicante',)

class QuintaForm(ModelForm):
    class Meta:
        model = Quinta
        exclude = ('publicante',)

class LocalForm(ModelForm):
    class Meta:
        model = Local
        exclude = ('publicante',)

class TerrenoForm(ModelForm):
    class Meta:
        model = Terreno
        exclude = ('publicante',)







